#include <iostream>

using namespace std;

int main()
{
    int X,Y;
    cin >>X;
    cin >>Y;


    if ( (X>0) and (Y>0)  )
     { printf("I");
    }

    if ( (X<0) and (Y>0)  )
     { printf("II");
     }

    if ( (X<0) and (Y<0)  )
     { printf("III");
     }

    if ( (X>0) and (Y<0)  )
     { printf("IV");
     }
    return 0;
}
